class Person:
    pass


class Student(Person):
    pass


class Teacher(Person):
    pass


class Worker(Person):
    pass


class Factory:
    def create_person(self, person_type):
        if person_type == "Student":
            return Student()
        elif person_type == "Teacher":
            return Teacher()
        elif person_type == "Worker":
            return Worker()
        else:
            raise ValueError("Invalid person type")


factory = Factory()
person = factory.create_person("Student")
print(person)
person = factory.create_person("Teacher")
print(person)
person = factory.create_person("Worker")
print(person)
